<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of profile
 *
 * @author Administrator
 */
class contact extends CI_Controller {
  //put your code here
  
  public function __construct() {
    parent::__construct();
  }
  
  public function index(){
    $this->load->view('provider/contact', array('title_html' => $this->lang->line('label.provider.title.contact')));
  }
  
  public function send(){
    $obj = $_REQUEST;
    $obj['date_create'] = time();
    $id = $this->feedback_model->save($obj);
    if (is_array($id))
      set_flash_error($id);
    else{
      set_flash_message($this->lang->line('message.contact.send.success'));
      redirect('provider');
      return;
    }
    $this->load->view('provider/contact', array(
        'obj' => $_REQUEST,
        'title_html' => $this->lang->line('label.provider.title.contact')));
  }
}